package com.dhecp.project.purchase.mapper;

import java.util.List;
import java.util.Map;

import com.dhecp.core.genericDao.GenericDao;
import com.dhecp.project.common.domain.UpdateDeleted;
import com.dhecp.project.common.domain.UpdateFlow;
import com.dhecp.project.purchase.domain.PurchasePlan;

public interface PurchasePlanMapper extends GenericDao<PurchasePlan, String> {


    /**
     * 查询已选择的商品数据
     * @param params
     * @return
     */
    List<PurchasePlan> querySelectList(Map<String, Object> params);
    List<PurchasePlan> querySelectList2(Map<String, Object> params);

    //未生成订单的计划
    List<PurchasePlan> select2(Map<String, Object> params);

    PurchasePlan findByBID(String bid);

    int deleteNid (String fNid);

    int createOrder(PurchasePlan purchasePlan);

    int updateOrderState(PurchasePlan purchasePlan);

    /**
     *@Description: 修改删除标志（仅需 guid 和 deleted）
     *@Param: [updateDeleted]
     *@return: int
     *@Author: hlf
     *@date: 2022-05-09 10:13
     */
    int updateDeleted(UpdateDeleted updateDeleted);

    /**
     *@Description: 修改流程状态及生效标志（仅需 guid、activeFlow、effectStock、updateTime）
     *@Param: [updateFlow]
     *@return: int
     *@Author: hlf
     *@date: 2022-05-09 10:13
     */
    int updateFlow(UpdateFlow updateFlow);

    //根据单号获取母件编码
    List<PurchasePlan> selectCodeByBid(String Bid);
}
